package vn.vfriends.soffice.service.impl;

import java.util.List;
import javax.inject.Inject;
import vn.vfriends.soffice.entity.Menu;
import vn.vfriends.soffice.facade.MenuFacade;
import vn.vfriends.soffice.service.MenuService;

/**
 *
 * @author chaungoctuan@gmail.com
 */
public class MenuServiceImpl implements MenuService {

    @Inject private MenuFacade menuFacade;
    
    @Override
    public void create(Menu menu) throws Exception {
        menuFacade.create(menu);
    }

    @Override
    public void edit(Menu menu) throws Exception {
        menuFacade.edit(menu);
    }

    @Override
    public void remove(Menu menu) throws Exception {
        menuFacade.remove(menu);
    }

    @Override
    public Menu find(Object id) {
        return menuFacade.find(id);
    }

    @Override
    public Menu findByName(String name) {
        return menuFacade.findByName(name);
    }
    
    @Override
    public List<Menu> findAll() {
        return menuFacade.findAll();
    }

    @Override
    public List<Menu> findRange(int[] range) {
        return menuFacade.findRange(range);
    }

    @Override
    public int count() {
        return menuFacade.count();
    }

    @Override
    public List<Menu> findChildren(Menu parent) {
        return menuFacade.findChildren(parent);
    }

    @Override
    public List<Menu> findFirstLevel() {
        return menuFacade.findFirstLevel();
    }

}
